<template>
  <div>
    <div class="pra-title">最受好评电影</div>
    <div class="pra-wrap">
      <ul>
        <li v-for="item in praiselist" :key="item.id">
          <div>
            <img :src="item.img" alt="item.nm" />
          </div>
          <div>{{ item.nm }}</div>
          <div class="pra-score">
            <span v-if="item.sc > 0">观众评分 {{ item.sc }}</span>
            <span v-else>{{ item.wish }}人想看</span>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  name: "MoviePraise",
  props: ["praiselist"],
};
</script>

<style lang="less" scoped>
&::-webkit-scrollbar {
  display: none;
}
.pra-title {
  font-size: 14px;
  height: 40px;
  line-height: 40px;
  padding-left: 10px;
  color: #333;
}
.pra-wrap {
  width: 95%;
  margin: auto;
  overflow-x: scroll;
  ul {
    width: 1100px;
    display: flex;

    li {
      margin-right: 10px;
      width: 2.2667rem;
      height: 160px;
      position: relative;
      .pra-score {
        position: absolute;
        top: 100px;
        left: 0;
        color: #faaf00;
        font-size: 11px;
        font-weight: 600;
      }
      div {
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: bold;
        font-size: 13px;
      }
      img {
        width: 2.2667rem;
        height: 3.0667rem;
      }
    }
  }
}
</style>